From: Claudio Cambra Date: Mon, 19 Dec 2022 16:05:13 +0000 (+0100) Subject: Only build NavigationPaneHelper on Windows X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2^2~27^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=b794a3b3d3acd3f6b5d46e720b315ceaeb739bf8;p=nextcloud-desktop.git Only build NavigationPaneHelper on Windows Signed-off-by: Claudio Cambra --- diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 2bfa004dd..a58117fcf 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -109,8 +109,6 @@ set(client_SRCS lockwatcher.cpp logbrowser.h logbrowser.cpp - navigationpanehelper.h - navigationpanehelper.cpp networksettings.h networksettings.cpp ocsnavigationappsjob.h @@ -339,13 +337,19 @@ IF( APPLE ) ENDIF() IF( NOT WIN32 AND NOT APPLE ) -set(client_SRCS ${client_SRCS} folderwatcher_linux.cpp) + set(client_SRCS ${client_SRCS} folderwatcher_linux.cpp) ENDIF() IF( WIN32 ) -set(client_SRCS ${client_SRCS} folderwatcher_win.cpp shellextensionsserver.cpp ${CMAKE_SOURCE_DIR}/src/common/shellextensionutils.cpp) + set(client_SRCS + ${client_SRCS} + folderwatcher_win.cpp + navigationpanehelper.h + navigationpanehelper.cpp + shellextensionsserver.cpp + ${CMAKE_SOURCE_DIR}/src/common/shellextensionutils.cpp) ENDIF() IF( APPLE ) -list(APPEND client_SRCS folderwatcher_mac.cpp) + list(APPEND client_SRCS folderwatcher_mac.cpp) ENDIF() set(3rdparty_SRC diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp index 6be6516e4..892c4fef0 100644 --- a/src/gui/folderman.cpp +++ b/src/gui/folderman.cpp @@ -62,7 +62,9 @@ FolderMan *FolderMan::_instance = nullptr; FolderMan::FolderMan(QObject *parent) : QObject(parent) , _lockWatcher(new LockWatcher) +#ifdef Q_OS_WIN , _navigationPaneHelper(this) +#endif { ASSERT(!_instance); _instance = this; @@ -1257,7 +1259,9 @@ Folder *FolderMan::addFolder(AccountState *accountState, const FolderDefinition emit folderListChanged(_folderMap); } +#ifdef Q_OS_WIN _navigationPaneHelper.scheduleUpdateCloudStorageRegistry(); +#endif return folder; } @@ -1277,10 +1281,12 @@ Folder *FolderMan::addFolderInternal( auto folder = new Folder(folderDefinition, accountState, std::move(vfs), this); +#ifdef Q_OS_WIN if (_navigationPaneHelper.showInExplorerNavigationPane() && folderDefinition.navigationPaneClsid.isNull()) { folder->setNavigationPaneClsid(QUuid::createUuid()); folder->saveToSettings(); } +#endif qCInfo(lcFolderMan) << "Adding folder to Folder Map " << folder << folder->alias(); _folderMap[folder->alias()] = folder; @@ -1414,7 +1420,9 @@ void FolderMan::removeFolder(Folder *folderToRemove) delete folderToRemove; } +#ifdef Q_OS_WIN _navigationPaneHelper.scheduleUpdateCloudStorageRegistry(); +#endif emit folderListChanged(_folderMap); } @@ -1551,7 +1559,9 @@ void FolderMan::slotWipeFolderForAccount(AccountState *accountState) delete f; } +#ifdef Q_OS_WIN _navigationPaneHelper.scheduleUpdateCloudStorageRegistry(); +#endif } emit folderListChanged(_folderMap); diff --git a/src/gui/folderman.h b/src/gui/folderman.h index b76ede8da..9ab08c9ab 100644 --- a/src/gui/folderman.h +++ b/src/gui/folderman.h @@ -23,7 +23,9 @@ #include "folder.h" #include "folderwatcher.h" +#ifdef Q_OS_WIN #include "navigationpanehelper.h" +#endif #include "syncfileitem.h" class TestFolderMan; @@ -403,7 +405,9 @@ private: bool _nextSyncShouldStartImmediately = false; QScopedPointer _socketApi; +#ifdef Q_OS_WIN NavigationPaneHelper _navigationPaneHelper; +#endif QPointer _removeE2eeShareJob;